package com.example.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @GetMapping("/info")
    public String userInfo() throws InterruptedException {
        // 正常响应
        return "User Service (Port: 8081)";

        // 测试熔断时使用：
        // Thread.sleep(5000);
        // return "User Service (Port: 8081) - Slow Response";
    }
}